<template>
	<div class="wrapper">
		<div class="">
			<van-field v-model="startSn" label="起始号开始" placeholder="请输入终端编号" />
		</div>
		<div class="">
			<van-field v-model="endSn" label="起始号结束" placeholder="请输入终端编号" />
		</div>
		<div class="">
			<van-cell-group :border="false">
				<van-field readonly is-link v-model="cardType" label="代理商" placeholder="请选择代理商"
					@click="goBank" />
			</van-cell-group>
		</div>
		<!-- <div class="btn_box">
			<div class="btn dis">
				确定
			</div>
		</div> -->
	</div>
</template>

<script>
	import {
		findSetPosFeeList
	} from '@/api/posManagement'
	import store from '@/store'
	import {
		showToast
	} from 'vant'
	export default defineComponent({
		name: 'sateActive',
		setup() {
			const routers = useRouter()
			const router = useRoute()
			const state = reactive({
				startSn: "",
				endSn: "",
				cardType:"",
				type:1
			})
			//调拨活动终端
			const goBank = () => {
				if (state.startSn != '') {
					routers.push({
						path: "terminalList",
						query: {
							channelCode: router.query.channelCode,
							type: state.type,
							startSn:state.startSn,
							endSn:state.endSn
						}
					})
				} else {
					showToast('请输入终端编号')
				}
			
				// router.push({
				// 	path: url,
				// 	query: {
				// 		channelCode: state.tabList[state.active].channelCode,
				// 		activityId:state.tabList[state.active].activityId
				// 	}
				// })
			}
			// const getFindPageList = () => {
			//     findSetPosFeeList({
			//         currentPage: state.currentPage,
			//         ...state.childData
			//     }).then(res => {
			//         if (res.object.length < 10) {
			//             state.finished = true
			//             state.loading = false
			//         } else {
			//             state.currentPage++
			//             state.finished = false
			//             state.loading = false
			//         }
			//         state.posList = state.posList.concat(res.object)
			//     })
			// }

			return {
				...toRefs(state),
				goBank
			}
		}
	})
</script>
<style scoped lang="scss">
	.wrapper {
		width: 100%;
		height: 100%;
		min-height: 100vh;
		.btn_box{
			position: absolute;
			left: 50%;
			bottom: 15%;
			transform: translateX(-50%);
			.btn{
				width: 339px;
				height: 41px;
				background: #FF2828;
				border-radius: 6px;
				font-size: 14px;
				color: #fff;
			}
		}
	}
</style>